home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / CSMP Digest / volume 1 / csmp-v1-111.txt < prev    next >
Encoding:
Text File  |  1992-12-31  |  47.8 KB  |  1,359 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Thu, 11 Jun 92       Volume 1 : Issue 111
  2.  
  3. Today's Topics:
  4.  
  5.     THINK C and basic AppleTalk comm ?
  6.     MPSR resource
  7.     Metrowerks PASCAL
  8.     MacTCP
  9.     mpw c++/cfront latest version?
  10.     Opening windows with explosions ?
  11.  
  12.  
  13. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  14.  
  15. These digests are available (by using FTP, account anonymous, your email
  16. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  17. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  18. Questions list.  The last several issues of the digest are available from
  19. sumex-aim.stanford.edu as well.
  20.  
  21. These digests are also available via email.  Just send a note saying that you
  22. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  23. automatically receive each new digest as it is created.
  24.  
  25. The digest is a collection of articles from the internet newsgroup comp.sys.
  26. mac.programmer.  It is designed for people who read c.s.m.p. semi-regularly
  27. and want an archive of the discussions.  If you don't know what a newsgroup
  28. is, you probably don't have access to it.  Ask your systems administrator(s)
  29. for details.  (This means you can't post questions to the digest.)
  30.  
  31. The articles in these digests are taken directly from comp.sys.mac.programmer.
  32. They are not edited; all articles included in this digest are in their original
  33. posted form.  The only articles that are -not- included in these digests are
  34. those which didn't receive any replies (except those that give information
  35. rather than ask a question).  All replies to each article are concatenated
  36. onto the original article in the order in which they were received.  Article
  37. threads are not added to the digests until the last article added to the
  38. thread is at least one month old (this is to ensure that the thread is dead
  39. before adding it to the digests).
  40.  
  41. Send administrative mail to mkelly@cs.uoregon.edu.
  42.  
  43. -------------------------------------------------------
  44.  
  45. Subject: THINK C and basic AppleTalk comm ?
  46. From: jordi@sc2a.unige.ch
  47. Date: 10 May 92 14:43:02 +0200
  48. Organization: University of Geneva, Switzerland
  49.  
  50. Hi Mac Programmers !
  51.  
  52. I would like to know if there are some ready-to-use THINK C routines to
  53. handle basic AppleTalk communications ?
  54. I would like to be able to get each Mac name connected to my Mac (under Sys 7)
  55. and send them the same message through AppleTalk (the way AppleShare does
  56. when shutting down).
  57.  
  58. If such a package exists, where can I get it? Shareware, Freeware ?
  59.  
  60. Thanks for the help !
  61.  
  62. Sincerely,
  63.  
  64. Steve Jordi                
  65.  
  66. +-------------------------+----------------------------------------------+
  67. | Dpt of Geophysics       | Fax: + 41 22 320-5732                        |
  68. | University of Geneva    |                                              |
  69. | 13, Rue des Maraichers  | E-Mail: Internet:   jordi@sc2a.unige.ch      |
  70. | 1211 GENEVA 4           |         Bitnet:     jordi@cgeuge52.bitnet    |
  71. | Switzerland             |         Compuserve: 70143,3056 (once a week) |
  72. +-------------------------+----------------------------------------------+ 
  73.  
  74.  
  75. ---------------------------
  76.  
  77. From: kseah@cs.utexas.edu (Kenneth Cheng-Lim Seah)
  78. Subject: MPSR resource
  79. Date: 30 Apr 1992 13:33:45 -0500
  80. Organization: ESCware Associates
  81.  
  82.  
  83. I've noticed that MPW and Think C use the MPSR resource (if I remember...
  84. I don't have resedit handy now and I think that's the name of the resource) to
  85. store the Marks placed in the text file.  if you have the format and can post
  86. it, please do so... -- Thanks a zillion -- Ken
  87. - -- 
  88. Kenneth Seah (kseah@cs.utexas.edu|PO Box 8565, Austin, TX 78713-8565|TAY 5.144)
  89. Grad Student, Dept of Computer Sciences, University of Texas at Austin
  90. "Money means nothing 'cause hacks are free..." (Apologies to MK)
  91. Disclaimer:  Disclaim 'er?? Why I don't even know 'er...
  92.  
  93. +++++++++++++++++++++++++++
  94.  
  95. From: keith@taligent.com (Keith Rollin)
  96. Date: 1 May 92 00:47:16 GMT
  97. Organization: Taligent
  98.  
  99. In article <l00fc9INN7up@muleshoe.cs.utexas.edu>, kseah@cs.utexas.edu (Kenneth
  100. Cheng-Lim Seah) writes:
  101. > I've noticed that MPW and Think C use the MPSR resource (if I remember...
  102. > I don't have resedit handy now and I think that's the name of the resource) to
  103. > store the Marks placed in the text file.  if you have the format and can post
  104. > it, please do so...
  105.  
  106.  
  107. #define resourceType    'MPSR'
  108. #define editMarkID       1007
  109.  
  110. struct MarkElement {
  111.     int             start;                  // start position of mark
  112.     int             end;                    // end position
  113.     unsigned char   charCount;              // number of chars in mark name
  114.     char            name[1];                // first char of mark name
  115. };                                          // (name is null terminated)
  116.  
  117.  
  118. struct MarkRsrc {
  119.     short count;                            // number of marks in the resource
  120.     MarkElement mark[0];                    // zero or more mark elements
  121. };
  122.  
  123. - --
  124. Keith Rollin
  125. Phantom Programmer
  126. Taligent, Inc.
  127.  
  128. +++++++++++++++++++++++++++
  129.  
  130. From: rae@alias.com (Reid Ellis)
  131. Date: 4 May 92 04:17:55 GMT
  132. Organization: Alias Research, Inc., Toronto ON Canada
  133.  
  134. Keith Rollin <keith@taligent.com> writes:
  135. |
  136. |#define resourceType    'MPSR'
  137. |#define editMarkID       1007
  138. |
  139. |struct MarkElement {
  140. |    int             start;                  // start position of mark
  141. |    int             end;                    // end position
  142. .. etc
  143.  
  144. Hey Keith, are those "int"s 32-bit or 16-bit?  :-)
  145.  
  146. Reid
  147. - --
  148. Reid Ellis                                            
  149. rae@utcs.utoronto.ca        ||           rae@Alias.com
  150. CDA0610@applelink.apple.com ||  +1 416 362 9181 [work]
  151.  
  152. +++++++++++++++++++++++++++
  153.  
  154. From: keith@taligent.com (Keith Rollin)
  155. Date: 7 May 92 23:20:07 GMT
  156. Organization: Taligent
  157.  
  158. In article <1992May4.041755.12438@alias.com>, rae@alias.com (Reid Ellis) writes:
  159. > Keith Rollin <keith@taligent.com> writes:
  160. > |
  161. > |#define resourceType    'MPSR'
  162. > |#define editMarkID       1007
  163. > |
  164. > |struct MarkElement {
  165. > |    int             start;                  // start position of mark
  166. > |    int             end;                    // end position
  167. > .. etc
  168. > Hey Keith, are those "int"s 32-bit or 16-bit?  :-)
  169.  
  170. Depends. On older machines, they were 24-bit. Nowadays, you could ask Gestalt:
  171.  
  172. err = Gestalt(gestaltIntSize, &sizeOfInt);
  173.  
  174. This way, when Apple goes to 64-bit ints in System 8.0 (on the Richter scale),
  175. you'll be prepared. Be sure not to miss the panel on this at the WWDC next week!
  176.  
  177. - --
  178. Keith Rollin
  179. Phantom Programmer
  180. Taligent, Inc.
  181.  
  182.  
  183.  
  184. +++++++++++++++++++++++++++
  185.  
  186. From: KURZAEV@JONATHAN.srcc.msu.su
  187. Date: 7 May 92 17:32:06 GMT
  188. Organization: unknown
  189.  
  190. In article <1992May4.041755.12438@alias.com>
  191. rae@alias.com (rae@alias.com (Reid Ellis)) writes:
  192. >Keith Rollin <keith@taligent.com> writes:
  193. >|
  194. >|#define resourceType    'MPSR'
  195. >|#define editMarkID       1007
  196. >|
  197. >|struct MarkElement {
  198. >|    int             start;                  // start position of mark
  199. >|    int             end;                    // end position
  200. >.. etc
  201. >
  202. >Hey Keith, are those "int"s 32-bit or 16-bit?  :-)
  203. >
  204. >Reid
  205. >--
  206. >Reid Ellis                                            
  207. >rae@utcs.utoronto.ca        ||           rae@Alias.com
  208. >CDA0610@applelink.apple.com ||  +1 416 362 9181 [work]
  209.  
  210. Execuse me please, I've missed the beginng of the discussion.
  211. What are you talking about.
  212.  
  213. Thanx in advance.
  214. Best,
  215. Paul Kurzaev
  216. Russia, Moscow University Computer Center
  217. AppleLink: MOSCOW.UNIV
  218. eMail:     KURZAEV@JONATHAN.srcc.msu.su
  219.  
  220. ---------------------------
  221.  
  222. From: hase@netmbx.netmbx.de (Hartmut Semken)
  223. Subject: Metrowerks PASCAL
  224. Organization: netmbx, Berlin, Germany
  225. Date: Thu, 30 Apr 1992 18:16:58 GMT
  226.  
  227.  
  228. Hello out there.
  229.  
  230. Does anybody know Metrowerks PASCAL for the Mac?
  231.  
  232. >From the specs (runs on any Macintosh, Turbo Pascal compatible) it
  233. sounded really nice; I bought it.
  234.  
  235. Sadly, it does not run on a Q700. Neither with nor without the cache.
  236. With or without any Inits and Cdevs, all I get is a system bomb with
  237. error code 11 (what does this mean anyway?).
  238.  
  239. In the documentation they give a net adress "metro@uquam.info.ca".
  240. Does anybody know this host? The european name server doesn't.
  241.  
  242. please help.
  243. hase
  244. - -- 
  245. hase
  246. Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37     hase@netmbx.netmbx.de
  247. " I liked ZORK. I loved THE PAWN, but then I needed
  248.   an adult adventure. I bought UNIX.
  249.  
  250. +++++++++++++++++++++++++++
  251.  
  252. From: quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  253. Date: 1 May 92 01:10:31 GMT
  254. Organization: The University of Western Australia
  255.  
  256. In article <IBS28XM@netmbx.netmbx.de>, hase@netmbx.netmbx.de (Hartmut Semken) writes:
  257. > Does anybody know Metrowerks PASCAL for the Mac?
  258. > From the specs (runs on any Macintosh, Turbo Pascal compatible) it
  259. > sounded really nice; I bought it.
  260. > Sadly, it does not run on a Q700. Neither with nor without the cache.
  261. > With or without any Inits and Cdevs, all I get is a system bomb with
  262. > error code 11 (what does this mean anyway?).
  263.  
  264. Yeah I had similar problems.  I did an evaluation of Metrowerks Pascal
  265. and found it to be sadly lacking.  Wich was a shame because neither
  266. of the big two Mac Pascal's (Think and MPW) show any sign of
  267. moving with the times.  They seem more interested in their C products
  268. )-:
  269.  
  270. > In the documentation they give a net adress "metro@uquam.info.ca".
  271. > Does anybody know this host? The european name server doesn't.
  272.  
  273. My Metrowerks Modula 2 manual gives their address as 
  274. <modula2@mips1.uqam.ca> and I've definitely had success mailing to
  275. that address.  You might try the postmaster there.
  276.  
  277. Share and Enjoy.
  278.  
  279. Quinn "The Eskimo!"   <quinn@cs.uwa.edu.au>  "Real Coke, Diet .sig"
  280. Department of Computer Science, The University of Western Australia
  281.  
  282. +++++++++++++++++++++++++++
  283.  
  284. From: siegel@world.std.com (Rich Siegel)
  285. Date: 1 May 92 02:54:26 GMT
  286. Organization: GCC Technologies
  287.  
  288. In article <1992May1.011031.28847@bilby.cs.uwa.edu.au> quinn@cs.uwa.edu.au (Quinn "The Eskimo!") writes:
  289. >
  290. >Yeah I had similar problems.  I did an evaluation of Metrowerks Pascal
  291. >and found it to be sadly lacking.  Wich was a shame because neither
  292. >of the big two Mac Pascal's (Think and MPW) show any sign of
  293. >moving with the times.  They seem more interested in their C products
  294. >)-:
  295.  
  296.     What sort of 'moving' did you have in mind? Both MPW and THINK
  297. Pascal have kept up with the latest Toolbox, machine, and system software
  298. revisions, and it's not like there have been any major changes to the
  299. Pascal standard to be implemented. Both linkers support 'far' models
  300. (MPW's does both far code and far data, THINK's does far code), which
  301. is useful for writing large programs, particularly with class libraries.
  302. Both environments include up-to-date class libraries, as well. (MPW's
  303. is optional, THINK's is included at no cost.)
  304.  
  305. R.
  306.  
  307.  
  308.  
  309. - -- 
  310. - -----------------------------------------------------------------------
  311. Rich Siegel                              Internet: siegel@world.std.com
  312. Software Engineer, Quickdraw Group
  313. GCC Technologies
  314.  
  315. +++++++++++++++++++++++++++
  316.  
  317. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  318. Organization: NCRPDA, Curtin University
  319. Date: Sun, 3 May 1992 05:22:25 GMT
  320.  
  321. In article <BnJxEr.GIF@world.std.com>, siegel@world.std.com (Rich Siegel) writes:
  322. > In article <1992May1.011031.28847@bilby.cs.uwa.edu.au> quinn@cs.uwa.edu.au (Quinn "The Eskimo!") writes:
  323.  
  324. > >of the big two Mac Pascal's (Think and MPW) show any sign of
  325. > >moving with the times.  They seem more interested in their C products
  326. > >)-:
  327. >     What sort of 'moving' did you have in mind? Both MPW and THINK
  328. > Pascal have kept up with the latest Toolbox, machine, and system software
  329. > revisions, and it's not like there have been any major changes to the
  330. > Pascal standard to be implemented. Both linkers support 'far' models
  331. > (MPW's does both far code and far data, THINK's does far code), which
  332. > is useful for writing large programs, particularly with class libraries.
  333. > Both environments include up-to-date class libraries, as well. (MPW's
  334. > is optional, THINK's is included at no cost.)
  335.  
  336. How bout fixing the editor bugs that have been around since THINK Pascal
  337. version 3 (such as the wayward outlining leaving trails, or the really
  338. fun disappearing begin's).  How bout larger that 64k structures and more
  339. that 64k globals.  How bout structured constants such as those available
  340. in Turbo Pascal since god knows when (1986?).  How bout warnings on 
  341. dangerous use of object fields (such as passing to var parameters).  How
  342. bout multiple errors detected per compile.  How bout warnings for unsued
  343. variables, or functions with no return value.  Perhaps some language
  344. extensions such as exceptions.  Perhaps nested comments would be nice,
  345. and multiline comments as well.  An option for relaxed string range checking
  346. would be nice.  Range Checking code that did sensible things in compiled
  347. apps (instead of bombing on machines without macsbug and doing nothing
  348. on machines with macsbug - great for debugging)-: would be good.
  349.  
  350. Well, that should do for starters.  Basically you are quite right, THINK
  351. and MPW pascals have kept up to date with the system libraries, but
  352. aside from that and far code there have been almost no improvements in
  353. years.
  354.  
  355. I like and use TP, but I am getting the impression that neither Apple
  356. nor Symantec are very interested in doing anything with their pascal
  357. compilers - Please Prove Me Wrong!
  358.  
  359. Have fun all,
  360.    Peter.
  361.  
  362. ______________________________________________________________________
  363. Peter N Lewis, NCRPDA, Curtin University      peter@cujo.curtin.edu.au
  364. GPO Box U1987, Perth WA 6001, AUSTRALIA            FAX: +61 9 367 8141
  365.  
  366.  
  367.  
  368. +++++++++++++++++++++++++++
  369.  
  370. Organization: Johannes Kepler University Linz - Computing Center
  371. Date: Sunday, 3 May 1992 15:30:07 CDT
  372. From: Norbert Mueller <K360171@ALIJKU11.BITNET>
  373.  
  374. My worst complaint about Pascal being neglected in favor of C is that
  375. Think C 5.0 has far better optimization than Think Pascal 4.0.
  376.  
  377. N. Mueller
  378.  
  379. P.S.: A Turbo Pascal compatible compiler for the Mac would facilitate
  380. porting a lot (but who ports? everybody writes everything from scratch in oop,
  381. dont we :-)
  382.  
  383. +++++++++++++++++++++++++++
  384.  
  385. From: quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  386. Date: 5 May 92 01:50:14 GMT
  387. Organization: The University of Western Australia
  388.  
  389. In article <92124.153007K360171@ALIJKU11.BITNET>, K360171@ALIJKU11.BITNET (Norbert Mueller) writes:
  390. > My worst complaint about Pascal being neglected in favor of C is that
  391. > Think C 5.0 has far better optimization than Think Pascal 4.0.
  392.  
  393. Damn the optimisations!  If I wanted speed I'd write it in assembler.  Which
  394. leads to my complaint about both Pascal compilers which is that neither
  395. have an inline assembler.  Think C has had one for ever (as far as I can
  396. tell) (I've don't, and never have, used C, Think or otherwise).  At least
  397. with MPW you can use Asm but when writing in Think Pascal you're stuffed
  398. Can anyone say hex boys and girls?  I thought hand assembly went out with
  399. valves!
  400.  
  401. > P.S.: A Turbo Pascal compatible compiler for the Mac would facilitate
  402. > porting a lot
  403.  
  404. Porting PC programs (ie those written in Turbo) strikes me as difficult.  What
  405. does one do with all those character graphics?  That's one of the things
  406. that I couldn't understand about Metrowerks.
  407.  
  408. Quinn "The Eskimo!"   <quinn@cs.uwa.edu.au>  "Real Coke, Diet .sig"
  409. Department of Computer Science, The University of Western Australia
  410.   -- Who, despite his raving compaints, still uses Pascal.
  411.  
  412. +++++++++++++++++++++++++++
  413.  
  414. From: dave@prc.unisys.com (David Lee Matuszek)
  415. Organization: Paoli Research Center - Paoli, PA
  416. Date: Wed, 6 May 1992 19:49:19 GMT
  417.  
  418. In article <1992May5.015014.9030@bilby.cs.uwa.edu.au> quinn@cs.uwa.edu.au (Quinn "The Eskimo!") writes:
  419. >
  420. >Damn the optimisations!  If I wanted speed I'd write it in assembler.  Which
  421. >leads to my complaint about both Pascal compilers which is that neither
  422. >have an inline assembler.  Think C has had one for ever (as far as I can
  423. >tell) (I've don't, and never have, used C, Think or otherwise).  At least
  424. >with MPW you can use Asm but when writing in Think Pascal you're stuffed
  425. >Can anyone say hex boys and girls?  I thought hand assembly went out with
  426. >valves!
  427.  
  428. RIGHT ON!!!!!!!!!!!!!!!!!!!!!!!!
  429.  
  430. >Quinn "The Eskimo!"   <quinn@cs.uwa.edu.au>  "Real Coke, Diet .sig"
  431. >Department of Computer Science, The University of Western Australia
  432. >  -- Who, despite his raving compaints, still uses Pascal.
  433.  
  434. Likewise.
  435.  
  436.  
  437.  
  438.  
  439. - -- 
  440.  
  441. - -- Red meat isn't bad for you.  Fuzzy blue-green meat is bad for you.   --
  442. - -- Dave Matuszek (dave@prc.unisys.com)  I don't speak for my employer.  --
  443. t3
  444.  
  445. +++++++++++++++++++++++++++
  446.  
  447. From: ksand@apple.com (Kent Sandvik)
  448. Date: 8 May 92 01:19:52 GMT
  449. Organization: MacDTS Mongols
  450.  
  451. In article <1992May5.015014.9030@bilby.cs.uwa.edu.au>, quinn@cs.uwa.edu.au
  452. (Quinn "The Eskimo!") writes:
  453.  
  454. > In article <92124.153007K360171@ALIJKU11.BITNET>, K360171@ALIJKU11.BITNET
  455. (Norbert Mueller) writes:
  456.  
  457. > > My worst complaint about Pascal being neglected in favor of C is that
  458. > > Think C 5.0 has far better optimization than Think Pascal 4.0.
  459.  
  460. > Damn the optimisations!  If I wanted speed I'd write it in assembler.  Which
  461. > leads to my complaint about both Pascal compilers which is that neither
  462. > have an inline assembler.  Think C has had one for ever (as far as I can
  463. > tell) (I've don't, and never have, used C, Think or otherwise).  At least
  464. > with MPW you can use Asm but when writing in Think Pascal you're stuffed
  465. > Can anyone say hex boys and girls?  I thought hand assembly went out with
  466. > valves!
  467.  
  468. C and Pascal and C++ and LISP and... Gee, language wars are so constructive.
  469. Anyway, the problem with asm use in future are those RISC boxes we will start
  470. producing. I don't state that it will be impossible to convert asm code
  471. from 68k to PowerPC. However it's another element of surprise project leaders
  472. get ulcer from.
  473.  
  474. That's the reason I'm for compilers that produce highly optimized code. It
  475. certainly does not hurt.
  476.  
  477. Cheers,
  478. Kent
  479.  
  480. +++++++++++++++++++++++++++
  481.  
  482. Organization: Johannes Kepler University Linz - Computing Center
  483. Date: Thursday, 7 May 1992 14:56:19 CDT
  484. From: Norbert Mueller <K360171@ALIJKU11.BITNET>
  485.  
  486. I still do believe optimizing compilers are important! Complex simulation
  487. programs of some 10000 lines math intensive code simply cannot be hand-
  488. optimized in assembly. My experience shows that although hand-assembly
  489. is undoubtedly faster in execution, the additional time needed for debugging
  490. rarely is worth the effort.
  491. Also computers excel in facilitating repeated tasks. So I prefer my
  492. computer to optimize the nth incarnation of <your favorite source code here>.
  493.  
  494. Just my opinion.
  495.  
  496. N. Mueller
  497.  
  498. +++++++++++++++++++++++++++
  499.  
  500. From: quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  501. Organization: The University of Western Australia
  502. Date: Mon, 11 May 1992 06:01:51 GMT
  503.  
  504. In article <92128.145620K360171@ALIJKU11.BITNET>, Norbert Mueller <K360171@ALIJKU11.BITNET> writes:
  505. > I still do believe optimizing compilers are important!
  506.  
  507. > My experience shows that although hand-assembly is undoubtedly faster in
  508. > execution, the additional time needed for debugging
  509. > rarely is worth the effort.
  510.  
  511. > Also computers excel in facilitating repeated tasks. So I prefer my
  512. > computer to optimize the nth incarnation of <your favorite source code here>.
  513.  
  514. All very valid points.  This topic started with my "Damn the optimisations"
  515. comment which was misinterpreted as meaning I prefer to do my optimisations
  516. in assembler.  Not really true.  I much prefer the compiler to do the
  517. optimisations however there are some things that I need to do in
  518. assembly eg clikLoop procedures for TextEdit.  So although optimisations
  519. are nice, a good assembler is *necessary*.  And the best assemblers
  520. are integrated into the programming environment.
  521.  
  522. Now if Apple sorted out their interfaces this problem would go away (-:
  523.  
  524. Quinn "The Eskimo!"   <quinn@cs.uwa.edu.au>  "Real Coke, Diet .sig"
  525. Department of Computer Science, The University of Western Australia
  526.  
  527.  
  528. ---------------------------
  529.  
  530. From: francois@welchgate.welch.jhu.edu (Francois Schiettecatte)
  531. Subject: MacTCP
  532. Organization: Johns Hopkins Univ. Welch Medical Library
  533. Date: Tue, 14 Apr 1992 13:25:07 GMT
  534.  
  535. Hi
  536.  
  537. I have a quick question about MacTCP and DNR. When the  drivers are
  538. opened do they get loaded into the application's memory space. I am
  539. asking this because I am writting a small application which uses 
  540. them and when I open up the MacTCp driver a chunk of my applications
  541. memory gets allocated, same goes for DNR. I am assuming that this is
  542. due to the drivers getting loaded. The problem with that is that the
  543. space gets allocated as pointers and cannot move, is there a way I 
  544. can cause the drivers to get loaded when I start my application up
  545. with just a couple of function calls so that the space allocated is 
  546. as low in memory as possible.
  547.  
  548.  
  549.  
  550. Francois Schiettecatte
  551. Internet: francois@library.welch.jhu.edu
  552. Phone    : (410) 955-7581
  553.  
  554.  
  555. +++++++++++++++++++++++++++
  556.  
  557. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  558. Date: 15 Apr 92 16:00:14 GMT
  559. Organization: University of Illinois at Urbana-Champaign
  560.  
  561. >>> Why not just use BlockMove?
  562. >>Even something as trivially simple as:
  563. >>    while (n--) *(q++) = *(p++);
  564. >>is faster than BlockMove for n < 50 - even as a subroutine!
  565. >Yes. A friend did a study of this and came up with a break-even point of about
  566. >32 to 34 bytes for a byte-copy loop, about 50 bytes for an unrolled byte-copy
  567. >loop.
  568.  
  569. It's pointless and counterproductive to worry about the time you save using
  570. custom assembly (or C) instead of BlockMove, unless you are in an inner loop of
  571. a time-critical section of code.  The few cpu cycles you save are no
  572. more valuable than the few bytes of memory you lose by not using the trap.
  573. AND you have to worry about compatibility (the original question was regarding
  574. the safety of using MOVE.W on some address returned by something or other).
  575.  
  576. Unless it's in a critical inner loop, forget it, and concentrate on something
  577. that will do some good.
  578. - -- 
  579. Steve Dorner, U of Illinois Computing Services Office
  580. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  581.  
  582. +++++++++++++++++++++++++++
  583.  
  584. From: jpurlia@qualcomm.com (John Purlia)
  585. Organization: Qualcomm Incorporated
  586. Date: Thu, 23 Apr 1992 20:51:49 GMT
  587.  
  588. Can anyone provide a little insight as to what "network failure" indicates
  589. in MacTCP?  Periodically, my asynchronous calls to TCPSend return a result
  590. code of -23012, connectionTerminated.  I installed an asynchronous
  591. notification routine to further identify the problem and in the terminReason
  592. I find "network failure" as oppose to other codes which would indicate an
  593. explicit close of the TCP connection.
  594.  
  595. So what does it mean?  Did the net take a temporary hit?  After clearing the
  596. alert which reports the TCPSend error, things seem to fun okay.
  597.  
  598. Thanks!
  599.  
  600. ..........................................................................
  601. John Purlia          : My brain; not my company's brain.  My brain says...
  602. jpurlia@qualcomm.com :      "Just about any movie could be made better
  603. AOL:  <Jpurlia>      :       if one of the characters were a vampire."
  604. ..........................................................................
  605.  
  606.  
  607. +++++++++++++++++++++++++++
  608.  
  609. From: bhays@teal.csn.org (Boyd Hays)
  610. Organization: Colorado SuperNet, Inc.
  611. Date: Sat, 2 May 1992 17:13:12 GMT
  612.  
  613. Hello,
  614.  
  615.     Has anyone ported SUN's RPCSRC or TIRPC to the Macintosh for use with
  616.     either ADSP or MacTCP? There was a reference in John Bloomer's RPC book
  617.     that it had been ported to the Mac, but I didn't see where one could
  618.     obtain it.
  619.  
  620.     Is it possible to use the Mac TCP to communicate with another process
  621.     on the same Macintosh? Efectively, I'd like to develop an application
  622.     locally and then migrate the parts.
  623.  
  624.     I'm looking for a BSD compatible socket library that uses MacTCP. I've
  625.     found one in isode for the Mac, but it didn't work "out of the box" and
  626.     I haven't investigated the problem. I've also tried the one done by
  627.     Tom Milligan and subsequently modified by Adrian Wong and David Kovar
  628.     for ThinkC but a file "MPWGlobals.h" seems to be missing. Does anyone
  629.     know where the latest and greatest version of a ThinkC version of this
  630.     work might be found?
  631.  
  632. Thanks in advance,
  633. Boyd Hays
  634. bhays@csn.org
  635.  
  636.  
  637. +++++++++++++++++++++++++++
  638.  
  639. From: newlin@lucky.ecn.purdue.edu (Johnny N.)
  640. Date: 7 May 92 19:36:18 GMT
  641. Organization: Purdue University Engineering Computer Network
  642.  
  643. Dear netters,
  644.  
  645.   I am trying to write a simple interface between and Mac and a UNIX
  646.   box, where the UNIX box sits and waits for requests, and then
  647.   sends some data back to the Mac.  I would like to just use 
  648.   some simple socket protocol.
  649.   Is there a package that implements sockets on top of the MacTCP?
  650.   And where can I get it?
  651.  
  652.   Or is there a better way to do this that I am missing?
  653.  
  654.  
  655. Thanks,
  656.  
  657. - -John
  658.  
  659. +++++++++++++++++++++++++++
  660.  
  661. From: blimoges@sobeco.com (Bertrand Limoges)
  662. Organization: Sobeco Ernst & Young
  663. Date: Fri, 8 May 1992 21:31:30 GMT
  664.  
  665. Hi, 
  666.  
  667. I've obtained the MacTCP 1.1 Examples from ftp.apple.com and have modified the
  668. MPW MPing sources to compile under THINK C 5.0. However, when I compile and run
  669. it, I get the 'Cannot open Resolver' alert and the application does an
  670. ExitToShell. I've checked the resolver.c source, a slight modification of the
  671. dnr.c supplied with the MacTCP developer's kit. The code does get hold of the
  672. dnrp resource, but when the rc = (*dnr)(OPENRESOLVER, fileName) line is
  673. executed, I get an rc of -1. nil is being passed as fileName, which according
  674. to the MacTCP Programmer's Guide is OK.
  675.  
  676. Anyone out there has any idea on what's going on? Alternately, pointers to
  677. other example sources for MacTCP would be appreciated.
  678.  
  679. Much obliged, Bertrand Limoges, Sobeco Ernst & Young, Montreal, Canada
  680.  
  681.  
  682. +++++++++++++++++++++++++++
  683.  
  684. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  685. Organization: University of Illinois at Urbana
  686. Date: Sat, 9 May 1992 16:40:51 GMT
  687.  
  688. blimoges@sobeco.com (Bertrand Limoges) writes:
  689.  
  690. >I've obtained the MacTCP 1.1 Examples from ftp.apple.com and have modified the
  691. >MPW MPing sources to compile under THINK C 5.0. However, when I compile and run
  692. >it, I get the 'Cannot open Resolver' alert and the application does an
  693. >ExitToShell. I've checked the resolver.c source, a slight modification of the
  694. >dnr.c supplied with the MacTCP developer's kit. The code does get hold of the
  695. >dnrp resource, but when the rc = (*dnr)(OPENRESOLVER, fileName) line is
  696. >executed, I get an rc of -1. nil is being passed as fileName, which according
  697. >to the MacTCP Programmer's Guide is OK.
  698.  
  699. >Anyone out there has any idea on what's going on? Alternately, pointers to
  700. >other example sources for MacTCP would be appreciated.
  701.  
  702. Yup. You see those declarations at the top of dnr.c which say things
  703. like "#define OPENRESOLVER 1"? Change them to all to have an "L" after
  704. the number, like:
  705.  
  706. #define OPENRESOLVER 1L
  707.  
  708. That way they will be longs instead of ints.
  709.  
  710. Also make sure that anything declared "int" in the header files is
  711. changed to a "long" for THINK C (unless you have ints as longs checked
  712. in your Options).
  713.  
  714. It is just silly that the dnr code does not do these things already.
  715.  
  716. (*Sigh*)
  717.  
  718. pr
  719. - --
  720. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  721. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  722. System manager - Cognitive Science Group, Beckman Institute, UIUC
  723. Internet: resnick@cogsci.uiuc.edu
  724.  
  725. ---------------------------
  726.  
  727. From: skrans@pnet51.orb.mn.org (Steve Krans)
  728. Subject: mpw c++/cfront latest version?
  729. Date: 19 Apr 92 22:05:27 GMT
  730. Organization: People-Net [pnet51], Minneapolis, MN.
  731.  
  732. What is the latest version of cfront that apples has ported?
  733.  
  734. Steve
  735.  
  736. UUCP: {tcnet, crash, quest}!orbit!pnet51!skrans
  737. ARPA: crash!orbit!pnet51!skrans@nosc.mil
  738. INET: skrans@pnet51.orb.mn.org
  739.  
  740. +++++++++++++++++++++++++++
  741.  
  742. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  743. Organization: University of Illinois at Urbana
  744. Date: Mon, 20 Apr 1992 01:54:49 GMT
  745.  
  746. skrans@pnet51.orb.mn.org (Steve Krans) writes:
  747.  
  748. >What is the latest version of cfront that apples has ported?
  749.  
  750. I think it's MPW CPlus/CFront 3.2 final, based on AT&T 2.1.1.
  751. - -- 
  752. Mark Lanett, Software Tools Group, NCSA; mlanett@uiuc.edu; NCSA.STG (AppleLink)
  753.  
  754. +++++++++++++++++++++++++++
  755.  
  756. From: ksand@apple.com (Kent Sandvik)
  757. Date: 21 Apr 92 19:03:27 GMT
  758. Organization: MacDTS Mongols
  759.  
  760. In article <1992Apr20.015449.1476@ux1.cso.uiuc.edu>, mlanett@void.ncsa.uiuc.edu
  761. (Mark Lanett) writes:
  762. > skrans@pnet51.orb.mn.org (Steve Krans) writes:
  763. > >What is the latest version of cfront that apples has ported?
  764. > I think it's MPW CPlus/CFront 3.2 final, based on AT&T 2.1.1.
  765.  
  766. AT&T has funny release levels, I think we ended up with AT&& 2.1.14
  767. with Apple bug fixes added to the source code. It's on ETO#7.
  768.  
  769. Cheers,
  770. Kent
  771.  
  772. +++++++++++++++++++++++++++
  773.  
  774. From: cory@enigami.mv.com (Cory Kempf)
  775. Date: 30 Apr 92 03:56:34 GMT
  776. Organization: EnigamI, Inc., Nashua, NH
  777.  
  778.  
  779. In article <23667@goofy.Apple.COM> (comp.sys.mac.programmer), ksand@apple.com (Kent Sandvik) writes:
  780. >In article <1992Apr20.015449.1476@ux1.cso.uiuc.edu>, mlanett@void.ncsa.uiuc.edu
  781. >(Mark Lanett) writes:
  782. >> skrans@pnet51.orb.mn.org (Steve Krans) writes:
  783. >> >What is the latest version of cfront that apples has ported?
  784. >> I think it's MPW CPlus/CFront 3.2 final, based on AT&T 2.1.1.
  785. >
  786. >AT&T has funny release levels, I think we ended up with AT&& 2.1.14
  787. >with Apple bug fixes added to the source code. It's on ETO#7.
  788.  
  789. So when are we going to catch up with the rest of the world?  I could
  790. really use templates...
  791.  
  792. +C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  793. a real C++ compiler!
  794.  
  795.  
  796. - -------------------------------------------------------------
  797. Cory Kempf                    EnigamI, Inc.
  798. cory@enigami.mv.com           ...!decvax!enigami!cory
  799. Microsoft Free and Proud Of It!... 
  800.                            ...Microsoft Products: Just Say no.
  801.  
  802. +++++++++++++++++++++++++++
  803.  
  804. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  805. Organization: University of Illinois at Urbana
  806. Date: Sun, 3 May 1992 23:23:10 GMT
  807.  
  808. cory@enigami.mv.com (Cory Kempf) writes:
  809.  
  810. >In article <23667@goofy.Apple.COM> (comp.sys.mac.programmer), ksand@apple.com (Kent Sandvik) writes:
  811. >>In article <1992Apr20.015449.1476@ux1.cso.uiuc.edu>, mlanett@void.ncsa.uiuc.edu
  812. >>(Mark Lanett) writes:
  813. >>> skrans@pnet51.orb.mn.org (Steve Krans) writes:
  814. >>> >What is the latest version of cfront that apples has ported?
  815. >>> I think it's MPW CPlus/CFront 3.2 final, based on AT&T 2.1.1.
  816. >>
  817. >>AT&T has funny release levels, I think we ended up with AT&& 2.1.14
  818. >>with Apple bug fixes added to the source code. It's on ETO#7.
  819.  
  820. >So when are we going to catch up with the rest of the world?  I could
  821. >really use templates...
  822.  
  823. What was it I heard an Apple person say? "We're taking a look-and-see attitude".
  824. In March they hadn't decided whether to roll their own or go with 3 (actually,
  825. they already *had* 3 but hadn't done the full MPW port yet).
  826.  
  827. There's at least one company in the unix world selling a 3-oh proprocessor;
  828. don't know what it would take to work on the Mac, or if it would like
  829. HandleObjects. There's also "genclass" from g++ and a pd template preprocessor
  830. that apparently is pretty close to 3... And macros, of course (my solution,
  831. for various reasons).
  832.  
  833. >+C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  834. >a real C++ compiler!
  835.  
  836. Anyone tried out rev2 of ZC++ yet?
  837.  
  838. Doesn't BC++ have telmplates *and* exceptions now?
  839. - -- 
  840. Mark Lanett, NCSA Software Development                         mlanett@uiuc.edu
  841.  
  842. +++++++++++++++++++++++++++
  843.  
  844. From: ksand@apple.com (Kent Sandvik)
  845. Date: 4 May 92 22:02:55 GMT
  846. Organization: MacDTS Mongols
  847.  
  848. In article <0105011F.29mh1k@dragon.enigami.mv.com>, cory@enigami.mv.com (Cory
  849. Kempf) writes:
  850. > In article <23667@goofy.Apple.COM> (comp.sys.mac.programmer), ksand@apple.com
  851. (Kent Sandvik) writes:
  852. > >In article <1992Apr20.015449.1476@ux1.cso.uiuc.edu>,
  853. mlanett@void.ncsa.uiuc.edu
  854. > >(Mark Lanett) writes:
  855. > >> skrans@pnet51.orb.mn.org (Steve Krans) writes:
  856. > >> >What is the latest version of cfront that apples has ported?
  857. > >> I think it's MPW CPlus/CFront 3.2 final, based on AT&T 2.1.1.
  858. > >
  859. > >AT&T has funny release levels, I think we ended up with AT&& 2.1.14
  860. > >with Apple bug fixes added to the source code. It's on ETO#7.
  861. > So when are we going to catch up with the rest of the world?  I could
  862. > really use templates...
  863.  
  864. The rest of the world is also catching up on templates, there are 
  865. few C++ compilers today that supports this feature. Another reason
  866. it takes some time to implement them has to do with the #@$%(T#$%
  867. way AT&T wrote in template support into the compiler, it's rather gross
  868. and I think we rest would like to implement something more support
  869. friendly.
  870.  
  871. > +C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  872. > a real C++ compiler!
  873.  
  874. Aren't we all, I gave up and am personally spending most of my private
  875. hacking time on dynamic languages :-).
  876.  
  877. Cheers,
  878. Kent
  879.  
  880. +++++++++++++++++++++++++++
  881.  
  882. From: cory@enigami.mv.com (Cory Kempf)
  883. Date: Thu, 7 May 92 21:58:21 EST
  884. Organization: EnigamI, Inc., Nashua, NH
  885.  
  886.  
  887. In article <mlanett.704935390@void> (comp.sys.mac.programmer), mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  888. >cory@enigami.mv.com (Cory Kempf) writes:
  889. >>+C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  890. >>a real C++ compiler!
  891.  
  892. >Doesn't BC++ have telmplates *and* exceptions now?
  893.  
  894. >From everthing that I have heard, BC++ is a full implimentation of
  895. the 3.0 language definition.  
  896.  
  897. The availability of tools is one of the few things that make me consider
  898. switching over to Windows / OS/2 (Still short lived flights of fancy
  899. / nightmares).
  900.  
  901. It is also one of the arguements that I cannot counter when I try
  902. to convince people to look at the Mac.
  903.  
  904. +C
  905.  
  906.  
  907. - -------------------------------------------------------------
  908. Cory Kempf                    EnigamI, Inc.
  909. cory@enigami.mv.com           ...!decvax!enigami!cory
  910. Microsoft Free and Proud Of It!... 
  911.                            ...Microsoft Products: Just Say no.
  912.  
  913. +++++++++++++++++++++++++++
  914.  
  915. From: cory@enigami.mv.com (Cory Kempf)
  916. Date: Thu, 7 May 92 22:05:01 EST
  917. Organization: EnigamI, Inc., Nashua, NH
  918.  
  919.  
  920. In article <24410@goofy.Apple.COM> (comp.sys.mac.programmer), ksand@apple.com (Kent Sandvik) writes:
  921. >In article <0105011F.29mh1k@dragon.enigami.mv.com>, cory@enigami.mv.com (Cory
  922. >Kempf) writes:
  923. >> So when are we going to catch up with the rest of the world?  I could
  924. >> really use templates...
  925. >
  926. >The rest of the world is also catching up on templates, there are 
  927. >few C++ compilers today that supports this feature. Another reason
  928. >it takes some time to implement them has to do with the #@$%(T#$%
  929. >way AT&T wrote in template support into the compiler, it's rather gross
  930. >and I think we rest would like to implement something more support
  931. >friendly.
  932.  
  933. I would have thought that Apple would have learned their lession after
  934. the Green Hills Debicle -- Apple cannot afford to farm out something
  935. as mission critical as compilers.  Not to Green Hills, nor to AT&T.
  936.  
  937. >> +C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  938. >> a real C++ compiler!
  939.  
  940. >Aren't we all, I gave up and am personally spending most of my private
  941. >hacking time on dynamic languages :-).
  942.  
  943. Nice, but unfortunately, the rest of us don't have that luxury.  We
  944. need to be able to build small, fast, maintainable code.  From what 
  945. I have seen of dynamic languages, while they are fun to play in, and 
  946. while they do have their nitch, they are not suited to production code.  
  947. Do you know something I don't?
  948.  
  949. +C
  950.  
  951.  
  952. - -------------------------------------------------------------
  953. Cory Kempf                    EnigamI, Inc.
  954. cory@enigami.mv.com           ...!decvax!enigami!cory
  955. Microsoft Free and Proud Of It!... 
  956.                            ...Microsoft Products: Just Say no.
  957.  
  958. +++++++++++++++++++++++++++
  959.  
  960. From: russotto@eng.umd.edu (Matthew T. Russotto)
  961. Date: Fri, 08 May 92 12:51:49 GMT
  962. Organization: College of Engineering, University of Maryland, College Park
  963.  
  964. In article <0105011F.2umgdv@dragon.enigami.mv.com> cory@enigami.mv.com writes:
  965. >
  966. >I would have thought that Apple would have learned their lession after
  967. >the Green Hills Debicle -- Apple cannot afford to farm out something
  968. >as mission critical as compilers.  Not to Green Hills, nor to AT&T.
  969.  
  970. Hey, I LIKED MPW C 2.0.2
  971.  
  972.  
  973.  
  974. - -- 
  975. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  976. Some news readers expect "Disclaimer:" here.
  977. Just say NO to police searches and seizures.  Make them use force.
  978. (not responsible for bodily harm resulting from following above advice)
  979.  
  980. +++++++++++++++++++++++++++
  981.  
  982. From: potts@itl.itd.umich.edu (Paul Potts)
  983. Organization: Instructional Technology Laboratory, University of Michigan
  984. Date: Fri, 8 May 92 14:25:10 GMT
  985.  
  986. In article <0105011F.2um3st@dragon.enigami.mv.com> cory@enigami.mv.com writes:
  987. >
  988. >In article <mlanett.704935390@void> (comp.sys.mac.programmer), mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  989. >>cory@enigami.mv.com (Cory Kempf) writes:
  990. >>>+C, anxiously waiting for CFront 3.0.  For that matter, also awaiting
  991. >>>a real C++ compiler!
  992. >
  993. >>Doesn't BC++ have telmplates *and* exceptions now?
  994. >
  995. >From everthing that I have heard, BC++ is a full implimentation of
  996. >the 3.0 language definition.  
  997. >
  998.  
  999. No, Borland C++ 3.0 does not have exceptions-handling. (Or, if it does,
  1000. it is entirely undocumented). MSC/C++ 7.0 does (but I don't think it does
  1001. anything with templates yet, which Borland does). 
  1002.  
  1003. It's aggravating - I'm looking at both packages, trying to determine which
  1004. to use for a project. Borland C++ has a class library for developing character-
  1005. based DOS apps with a simple GUI. Microsoft has excellent foundation classes
  1006. for data structures that are very well-documented, but no DOS-based GUI
  1007. classes. The Borland documentation seems to be pretty inadequate. I'd like
  1008. to be able to take the container classes from Microsoft and the GUI classes
  1009. from Borland, but I suspect that way would lie flaming death...
  1010.  
  1011. - -- 
  1012. "breakpoints" _See_also_ debugging, watch expressions; "debugging breakpoints"
  1013.  _See_ breakpoints; "debugging watch expressions" _See_ watch expressions;
  1014. "watch expressions" _See_also_ debugging... (Borland C++ manual index)
  1015. Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
  1016.  
  1017. +++++++++++++++++++++++++++
  1018.  
  1019. From: d88-jwa@dront.nada.kth.se (Jon W{tte)
  1020. Date: 8 May 92 16:38:22 GMT
  1021. Organization: Royal Institute of Technology, Stockholm, Sweden
  1022.  
  1023. .umd.edu> russotto@eng.umd.edu (Matthew T. Russotto) writes:
  1024.  
  1025.    >the Green Hills Debicle -- Apple cannot afford to farm out something
  1026.    >as mission critical as compilers.  Not to Green Hills, nor to AT&T.
  1027.  
  1028.    Hey, I LIKED MPW C 2.0.2
  1029.  
  1030. I'm only sorry they didn't choose DCC. But that may be from a
  1031. slightly biased viewpoint...
  1032.  
  1033. - -- 
  1034. h++ - new and improved !
  1035.  
  1036. "It's simple. Some people have braces in their names, and some don't. You'll
  1037.    just have to accept it the way it is." - Me: h+@nada.kth.se; Jon W{tte
  1038.  
  1039. +++++++++++++++++++++++++++
  1040.  
  1041. From: amanda@visix.com (Amanda Walker)
  1042. Organization: Visix Software Inc., Reston, VA
  1043. Date: Sun, 10 May 92 05:26:53 GMT
  1044.  
  1045. russotto@eng.umd.edu (Matthew T. Russotto) writes:
  1046. > Hey, I LIKED MPW C 2.0.2
  1047.  
  1048. Me too.  At least it handled complex expressions correctly, which is more
  1049. than you can say for the first several versions of MPW C 3.x.  I still have
  1050. code that MPW C 2.0.2 compiled correctly that MPW C blows up on.
  1051.  
  1052. Now, don't get me wrong--the latest versions of MPW C are nice and spiffy,
  1053. and have some great improvements over 2.0.2.  On the other hand, it's only
  1054. now even approaching the stability of the old Green Hills compiler...
  1055.  
  1056.  
  1057. Amanda Walker                        amanda@visix.com
  1058. Visix Software Inc.                     +1 800 832 8668
  1059. - -- 
  1060. "It can hardly be coincidence that no language on earth has ever
  1061.  produced the expression "As pretty as an airport."    --Douglas Adams
  1062.  
  1063. ---------------------------
  1064.  
  1065. From: jordi@sc2a.unige.ch
  1066. Subject: Opening windows with explosions ?
  1067. Date: 24 Apr 92 15:11:07 GMT
  1068. Organization: University of Geneva, Switzerland
  1069.  
  1070. Hi there,
  1071. When opening and displaying a new window on the Mac screen... Is it possible
  1072. to opend it the way desktop folders do ? With explosion effects ?
  1073. I use Think C 5. Is there some examples somewhere ?
  1074.  
  1075. Thanks for any help !
  1076.  
  1077. Sincerely,
  1078.  
  1079. Steve Jordi                
  1080.  
  1081. +-------------------------+----------------------------------------------+
  1082. | Dpt of Geophysics       | Fax: + 41 22 205-732                         |
  1083. | University of Geneva    |                                              |
  1084. | 13, Rue des Maraichers  | E-Mail: Internet:   jordi@sc2a.unige.ch      |
  1085. | 1211 GENEVA 4           |         Bitnet:     jordi@cgeuge52.bitnet    |
  1086. | Switzerland             |         Compuserve: 70143,3056 (once a week) |
  1087. +-------------------------+----------------------------------------------+ 
  1088.  
  1089. +++++++++++++++++++++++++++
  1090.  
  1091. From: jpugh@apple.com (Jon Pugh)
  1092. Date: 1 May 92 19:50:27 GMT
  1093. Organization: Apple Co.
  1094.  
  1095. In article <1992Apr24.171107.832@sc2a.unige.ch>, jordi@sc2a.unige.ch writes:
  1096. > Hi there,
  1097. > When opening and displaying a new window on the Mac screen... Is it possible
  1098. > to opend it the way desktop folders do ? With explosion effects ?
  1099.  
  1100. They are called zoom rects and all you have to do it draw them with FrameRect.
  1101. It's almost trivial.
  1102.  
  1103. Jon
  1104.  
  1105. +++++++++++++++++++++++++++
  1106.  
  1107. From: jpugh@apple.com (Jon Pugh)
  1108. Date: 1 May 92 19:50:52 GMT
  1109. Organization: Apple Co.
  1110.  
  1111. In article <1992Apr24.171107.832@sc2a.unige.ch>, jordi@sc2a.unige.ch writes:
  1112. > Hi there,
  1113. > When opening and displaying a new window on the Mac screen... Is it possible
  1114. > to opend it the way desktop folders do ? With explosion effects ?
  1115.  
  1116. They are called zoom rects and all you have to do it draw them with FrameRect.
  1117. It's almost trivial.
  1118.  
  1119. Jon
  1120.  
  1121. +++++++++++++++++++++++++++
  1122.  
  1123. From: edw@caligula.cts.com (Ed Watkeys)
  1124. Date: Mon, 4 May 92 21:37:48 EDT
  1125. Organization: Distant Software
  1126.  
  1127.  
  1128. In article <24299@goofy.Apple.COM> (comp.sys.mac.programmer), jpugh@apple.com (Jon Pugh) writes:
  1129. > In article <1992Apr24.171107.832@sc2a.unige.ch>, jordi@sc2a.unige.ch writes:
  1130. > > 
  1131. > > Hi there,
  1132. > > When opening and displaying a new window on the Mac screen... Is it possible
  1133. > > to opend it the way desktop folders do ? With explosion effects ?
  1134. > They are called zoom rects and all you have to do it draw them with FrameRect.
  1135. > It's almost trivial.
  1136. > Jon
  1137.  
  1138. Frontier and associated programs bundled with it have a really nifty zooming
  1139. action, and the code can be found in the UserLand Frontier SDK, which can
  1140. be found on some FTP sites somewhere...
  1141.  
  1142. Ed
  1143.  
  1144. - --
  1145. Ed Watkeys (Drexel U. Comp Sci)  "Moral judgement and condemnation is
  1146. edw@caligula.cts.com              the favorite form of revenge for the
  1147. edw%caligula@phlpa.pha.pa.us      spiritually limited on those who are
  1148. ls.com!phlpa!caligula!edw         less so...." -- Friedrich Nietzsche
  1149.  
  1150. +++++++++++++++++++++++++++
  1151.  
  1152. From: juha@skynet.oulu.fi (Juha Pirttil{)
  1153. Date: 5 May 92 10:19:06 GMT
  1154. Organization: Department of Physics, University of Oulu
  1155.  
  1156. Here is a Pascal procedure that will do the zoomRects effect between two
  1157. given rectangles on the current grafPort. It may 
  1158. not be the most elegant solution (it has been written in a hurry) but
  1159. anyway it woks...
  1160.  
  1161.  procedure ZoomRects (alkuRect, LoppuRect: rect);
  1162.   var
  1163.    piirtoRect: array[1..8] of rect;
  1164.    dh, dv, offsetDh, offsetDv, i: integer;
  1165.    tickit: longint;
  1166.  
  1167.  begin
  1168.   piirtoRect[1] := alkuRect;
  1169.   PenMode(patXor);
  1170.   penPat(gray);
  1171.   dv := -((loppuRect.bottom - loppuRect.top) - 
  1172.          (alkuRect.bottom - alkuRect.top)) div 16;
  1173.   dh := -((loppuRect.right - loppuRect.left) - 
  1174.          (alkuRect.right - alkuRect.left)) div 16;
  1175.   offsetDh := (((loppuRect.right - loppuRect.left) div 2 +
  1176. loppuRect.left) -
  1177.       ((alkuRect.right - alkuRect.left) div 2 + alkuRect.left)) div 8;
  1178.   offsetDv := (((loppuRect.bottom - loppuRect.top) div 2 + loppuRect.top)
  1179. - - 
  1180.       ((alkuRect.bottom - alkuRect.top) div 2 + alkuRect.top)) div 8;
  1181.   for i := 2 to 14 do
  1182.    begin
  1183.     if i > 6 then
  1184.      frameRect(piirtoRect[i - 6]);
  1185.     if i <= 8 then
  1186.      begin
  1187.       piirtoRect[i] := piirtoRect[i - 1];
  1188.       insetRect(piirtoRect[i], dh, dv);
  1189.       offsetRect(piirtoRect[i], offsetDh, offsetDv);
  1190.       frameRect(piirtoRect[i]);
  1191.      end;
  1192.     tickit := tickCount;  {to make the effect slow enough, looks }
  1193.     repeat                {better}
  1194.     until tickCount > tickit + 1;
  1195.    end;
  1196.   PenNormal;
  1197.  end;
  1198.  
  1199. Some comments: alkuRect is the starting rect and loppuRect is the
  1200. ending rect. dh & dv are the rect size offsets and offsetDh & offsetDv 
  1201. are the location offsets of the rectangle. 
  1202. PiirtoRect is an array of rectangles that is used to do the 
  1203. actual zoom effect. 
  1204.  
  1205.               Juha Pirttil{
  1206.               Department of Physics
  1207.               University of Oulu
  1208.               Finland
  1209.  
  1210. +++++++++++++++++++++++++++
  1211.  
  1212. From: ksand@apple.com (Kent Sandvik)
  1213. Date: 8 May 92 19:42:37 GMT
  1214. Organization: MacDTS Mongols
  1215.  
  1216. In article <1992May5.101906.12862@ousrvr.oulu.fi>, juha@skynet.oulu.fi (Juha
  1217. Pirttil{) writes:
  1218. > Some comments: alkuRect is the starting rect and loppuRect is the
  1219. > ending rect. dh & dv are the rect size offsets and offsetDh & offsetDv 
  1220. > are the location offsets of the rectangle. 
  1221. > PiirtoRect is an array of rectangles that is used to do the 
  1222. > actual zoom effect. 
  1223.  
  1224. alku = beginning
  1225. loppu = end
  1226. Piirto = a verb-noun, eh, like the act or drawing.
  1227. It seems I still remember a little bit Finnish...
  1228.  
  1229.  
  1230. Here's some other code I found in my huge archive, not personally tested:
  1231.  
  1232. - ----
  1233. Here's how I did it in Pascal.  I haven't looked at this code for years,
  1234. but I use it frequently:
  1235.  
  1236. unit Zoom;
  1237.  
  1238. interface
  1239.  
  1240. {ZoomRect is a procedure which zooms a series of dotted rectangles from}
  1241. {startRect to endRect.  Pass it the rects in GLOBAL coordinates.}
  1242.  
  1243. procedure ZoomRect (startRect, EndRect: rect);
  1244.  
  1245. implementation
  1246.  
  1247. {-----------------------------------------------------------------------}
  1248.   procedure ZoomRect (startRect, EndRect: rect);
  1249.     const
  1250.       NumRects = 4; {Number of rectangles displayed at once (the latency)}
  1251.       Steps = 18;   {Coarseness of the grain}
  1252.     var
  1253.       TopStep, LeftStep, BottomStep, RightStep, i, j: integer;
  1254.       EmptyRect: rect;
  1255.       RectList: array[1..NumRects] of rect;
  1256.       aPort, oldPort: Grafptr;
  1257.       portStorage: GrafPort;
  1258.   begin
  1259.     TopStep := (EndRect.top - StartRect.top) div steps;
  1260.     LeftStep := (EndRect.left - StartRect.left) div steps;
  1261.     BottomStep := (EndRect.bottom - StartRect.bottom) div steps;
  1262.     RightStep := (EndRect.right - StartRect.right) div steps;
  1263.  
  1264.     GetPort(oldPort); {save the current port}
  1265.  
  1266.     aPort := GrafPtr(@portStorage); {make aPort point to stack storage}
  1267.  
  1268. {open the port and make it current -- whole screen is used}
  1269.     OpenPort(aPort); 
  1270.     PenMode(notpatXor);
  1271.     PenPat(gray);
  1272.  
  1273.     SetRect(EmptyRect, 0, 0, 0, 0);
  1274.     for i := 1 to NumRects do
  1275.       RectList[i] := EmptyRect;
  1276.  
  1277.     for i := 1 to steps - 1 do
  1278.       begin
  1279.         FrameRect(RectList[1]);   {erase first rect}
  1280.         StartRect.top := StartRect.top + TopStep;
  1281.         StartRect.left := StartRect.left + LeftStep;
  1282.         StartRect.bottom := StartRect.bottom + BottomStep;
  1283.         StartRect.right := StartRect.right + RightStep;
  1284.         FrameRect(StartRect);   {paint next rect}
  1285.         for j := 1 to NumRects - 1 do
  1286.           RectList[j] := RectList[j + 1];
  1287.         RectList[NumRects] := StartRect;  {remember last rect}
  1288.       end;
  1289.  
  1290.     for i := 1 to NumRects do
  1291.       FrameRect(RectList[i]);     {final erasure}
  1292.  
  1293.     ClosePort(aPort); {close the temporary port}
  1294.  
  1295.     SetPort(oldPort); {restore the previous port}
  1296.   end;
  1297. end.
  1298.  
  1299. ===============================================================================
  1300. Lincoln D. Stein                                Brigham & Women's Hospital
  1301. lstein@hstbme.mit.edu                           Boston, MA
  1302.  
  1303. - -----
  1304. Cheers, Kent
  1305. - --
  1306. Kent Sandvik/DTS - Dynamic Language Evangelist.
  1307. Opinions expressed are not private, and not owned by any company, organization
  1308. or group. Happy happy, joy joy!
  1309.  
  1310. +++++++++++++++++++++++++++
  1311.  
  1312. From: lippin@jaffna.berkeley.edu (The Apathist)
  1313. Date: 9 May 92 22:37:44 GMT
  1314. Organization: Authorized Service, Incorporated
  1315.  
  1316. I know of two improvements that can be made to the ZoomRect algorithms
  1317. posted here:
  1318.  
  1319. First, to reduce flicker, erase the old rectangle and draw the new one
  1320. in a single step.  This can be acheived by putting the frame of each
  1321. rectangle into a region, calculating their exclusive or, and drawing
  1322. the result.  This is particularly beneficial when one side of the
  1323. rectangle may be moving very slowly.
  1324.  
  1325. Second, for a more pleasing effect, don't space the rectangles evenly.
  1326. Instead, have them bunch up towards the ends of the motion -- I
  1327. suggest using sine on [-pi,pi] to guide the motion.  The result is
  1328. that the rectangles start slowly, speed up, and slow to a halt at
  1329. their destination in a smooth motion.
  1330.  
  1331.                     --Tom Lippincott
  1332.                       lippin@math.berkeley.edu
  1333.  
  1334.     "No problem is insoluble given a big enough plastic bag."
  1335.                     --Tom Stoppard, "Jumpers"
  1336.  
  1337. ---------------------------
  1338.  
  1339. End of C.S.M.P. Digest
  1340. **********************
  1341.